import request from "../utils/request";
import requestOther from "../utils/requestOther";
export function get(id:string) {
  return request({
    method: "get",
    url: `/view/engineering/component?&componentid=${id}`,
    responseType: "json",
  });
}
export function gets(url:string) {
  return request({
    method: "get",
    url,
  });
}
export function post(url:string, data: Object = {}) {
  return request({
    method: "post",
    url,
    data,
  });
}
export function deletes(url:string, data: Object = {}) {
  return request({
    method: "delete",
    url,
    data,
  });
}
export function httpAll(url:string,method:string, data: Object = {}) {
  return request({
    method,
    url,
    data,
  });
}
export function OtherHttp(url:string,method:string, data: Object = {}){
  console.log(url,method, data,999);
  
  return requestOther({
    method,
    url,
    data,
  });
}
